package org.jdamico.socks.server.impl;

import java.io.IOException;
import java.net.InetAddress;

public interface SocksCommonInterface {
	
	/**
	 * 校验client身份信息ß
	 * @param SocksVersion
	 * @throws Exception
	 */
	void    authenticate(byte SocksVersion) throws	Exception;
	/**
	 * 客户端请求绑定（反向数据处理）的处理方法 
	 * @throws IOException
	 */
	void    bind()	throws IOException;
	/**
	 * 绑定反向响应地址
	 * @param replyCode 响应码
	 * @param socksBindServerInet
	 * @param socksBingServerPort
	 * @throws IOException
	 */
	void	bindReply( byte replyCode, InetAddress socksBindServerInet, int socksBingServerPort ) throws	IOException;
	/**
	 * 客户端请求一般数据请求的方法ß
	 * @throws Exception
	 */
	void	connect() throws Exception;
	void	replyCommand( byte replyCode );
	byte	getSuccessCode();
	byte	getFailCode();
	void	checkClientCommand() throws Exception;
}
